package com.zephyr.vchcenter.bpm.action;

import org.apache.log4j.Logger;

import com.hiaward.bpm.action.ServiceAction;
import com.hiaward.bpm.context.ServiceContext;
import com.hiaward.bpm.exception.ParameterException;
import com.hiaward.bpm.exception.ServiceException;
import com.zephyr.vchcenter.bean.Voucher;
import com.zephyr.vchcenter.bpm.decision.NeedIdDecisionHandler;
import com.zephyr.vchcenter.dao.IBaseDao;
import com.zephyr.vchcenter.helper.SpringHelper;

public class WsIdAction extends ServiceAction {

	private final Logger log = Logger.getLogger(WsIdAction.class);
	public void perform(ServiceContext context) throws ServiceException,
			ParameterException {
		log.debug("进入WsIdAction...........");
		String vchsid=(String)context.getInputParameterValue("vchsid");
		IBaseDao dao=(IBaseDao)SpringHelper.getBean("baseDao");
        Voucher voucher=(Voucher)dao.findById("Voucher",vchsid);
        voucher.setSysidres("2");
        dao.saveOrUpdate(voucher);
        context.getToken().signal();
        log.debug("离开WsIdAction...........");
        

	}

	@Override
	public void serviceExceptionHandle(ServiceContext arg0,
			ServiceException arg1) {


	}

}
